package com.cmy.dao.user;

import com.cmy.pojo.Role;
import com.cmy.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    //得到要登录的用户
    public User getLoginUser(Connection connection,String userCode,String password);
    //修改当前用户密码
    public int updatePwd(Connection connection,int id,String password) throws SQLException;
    //根据用户名和用户角色查询个数
    public int getCount(Connection connectin,String userName,int userRole) throws SQLException;
    //根据用户名或用户角色查询用户
    public List<User> getUserList(Connection connection,String userName,int userRole,int currentPageNo,int pageSize) throws SQLException;
    //添加用户
    public boolean addUser(Connection connection,User user) throws SQLException;
    //根据UserCode判断用户是否存在
    public boolean userCodeExist(Connection connection,String userCode) throws SQLException;
}

    